<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            margin: 100px auto;
        }
        .box img{
            width: 100px;
            margin-top: 5px;
        }
        .box .close-btn{
            position: absolute;
            top: 126px;
            left: 312px;
            width: 14px;
            height: 14px;
            border: 1px solid #ccc;
            line-height: 14px;
            cursor: pointer;

        }
    </style>
</head>
<body>
    <div class="box">
        淘宝二维码
        <img src="img/taobao.png" alt="">
        <i class="close-btn">x</i>
    </div>
    <script>
        var btn = document.querySelector('.close-btn');
        var box = document.querySelector('.box');
        btn.onclick = function () {
            box.style.display = 'none';
        }

    </script>
</body>
</html>